package com.example.wishstar.model;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName = "users")
public class Users {
    @PrimaryKey()
    @ColumnInfo(name = "userId", typeAffinity = ColumnInfo.INTEGER)
    public int userId;

    @ColumnInfo(name = "userMail", typeAffinity = ColumnInfo.TEXT)
    public String userMail;

    @ColumnInfo(name = "nickname", typeAffinity = ColumnInfo.TEXT)
    public String nickname;

    @ColumnInfo(name = "password", typeAffinity = ColumnInfo.TEXT)
    public String password;

    @ColumnInfo(name = "headImage", typeAffinity = ColumnInfo.TEXT)
    public String headImage;

    @ColumnInfo(name = "phone", typeAffinity = ColumnInfo.TEXT)
    public String phone;

    @ColumnInfo(name = "motto", typeAffinity = ColumnInfo.TEXT)
    public String motto;

    @ColumnInfo(name = "gmtCreate", typeAffinity = ColumnInfo.TEXT)
    public String gmtCreate;

    @ColumnInfo(name = "gmtModified", typeAffinity = ColumnInfo.TEXT)
    public String gmtModified;

    @ColumnInfo(name = "deleted", typeAffinity = ColumnInfo.INTEGER)
    public int deleted;

    public Users(int userId, String userMail, String nickname, String password, String headImage, String phone, String motto, String gmtCreate, String gmtModified, int deleted) {
        this.userId = userId;
        this.userMail = userMail;
        this.nickname = nickname;
        this.password = password;
        this.headImage = headImage;
        this.phone = phone;
        this.motto = motto;
        this.gmtCreate = gmtCreate;
        this.gmtModified = gmtModified;
        this.deleted = deleted;
    }

    @Ignore
    public Users(int userId, String nickname, String motto) {
        this.userId = userId;
        this.nickname = nickname;
        this.motto = motto;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserMail() {
        return userMail;
    }

    public void setUserMail(String userMail) {
        this.userMail = userMail;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getHeadImage() {
        return headImage;
    }

    public void setHeadImage(String headImage) {
        this.headImage = headImage;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getMotto() {
        return motto;
    }

    public void setMotto(String motto) {
        this.motto = motto;
    }

    public String getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(String gmtModified) {
        this.gmtModified = gmtModified;
    }

    public int getDeleted() {
        return deleted;
    }

    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        return "Users{" +
                "userId=" + userId +
                ", userMail='" + userMail + '\'' +
                ", nickname='" + nickname + '\'' +
                ", password='" + password + '\'' +
                ", headImage='" + headImage + '\'' +
                ", phone='" + phone + '\'' +
                ", motto='" + motto + '\'' +
                ", gmtCreate='" + gmtCreate + '\'' +
                ", gmtModified='" + gmtModified + '\'' +
                ", deleted=" + deleted +
                '}';
    }
}
